package com.paiai.lslease.service.appinvite;

import com.paiai.lslease.auto.model.AppInvitation;
import com.paiai.lslease.model.AppInvitationInfo;

import java.util.List;

public interface AppInviteService {

    /**
     * 发送租房邀请
     */
    AppInvitation sendRentingInvitation(AppInvitation appInvitation) throws Exception;

    /**
     * 用户查询自己是否有新的租房邀请
     */
    List<AppInvitationInfo> selectUserRentingInvitationList(String userMobile) throws Exception;

    /**
     * 租客接受房东的租房邀请，确认入住
     */
    boolean confirmRentingInvitationByPrimaryId(AppInvitation appInvitation) throws Exception;

    /**
     * 查询单个邀请
     */
    AppInvitation selectSingleInvitation(int invitationId) throws Exception;

    /**
     * 是否存在邀请
     */
    boolean existInvitation(int invitationId) throws Exception;

    /**
     * 是否存在未接受的邀请
     */
    boolean existNotAcceptInvitation(int landlordId, String userMobile, int lockId) throws Exception;

    /**
     * 更新租房邀请
     */
    AppInvitation updateRentingInvitation(AppInvitation appInvitation) throws Exception;
}
